<script>
export default {
  name: 'ArticalDetail',
  data() {
    return {
      content: ''
    };
  },
  async fetch() {
    await this.getInfo();
  },
  methods: {
    async getInfo() {
      try {
        const res = await this.$api.post('/home/getArticleInfo', {
          id: this.$route.params.id || this.$route.query.id
        });
        this.content = res.content;
      } catch (error) {
        // console.log(error);
      }
    }
  }
};
</script>

<template>
  <v-container class="contain px-3">
    <div v-html="content" />
  </v-container>
</template>
